par(mfrow=c(2,2))
N <- 151
theta.0 <- c(1, -0.6, 1.2)

y.1 <- rep(0, N)
z <- rpois(N, theta.0[3])
y.1[1] <- 2
for (i in 2:N)
{
  #phi <- runif(1, min=0, max=2*exp(theta.0[1]+theta.0[2]*y[i-1])/(1+exp(theta.0[1]+theta.0[2]*y[i-1])))
  #phi <- rexp(1, (1+exp(theta.0[1]+theta.0[2]*y[i-1]))/exp(theta.0[1]+theta.0[2]*y[i-1]))
  #phi <- rchisq(1, exp(theta.0[1]+theta.0[2]*y[i-1])/(1+exp(theta.0[1]+theta.0[2]*y[i-1])))
  phi <- exp(theta.0[1]+theta.0[2]*y.1[i-1])/(1+exp(theta.0[1]+theta.0[2]*y.1[i-1]))
  y.1[i] <- rpois(1, phi*y.1[i-1]) + z[i]
}
y.1 <- ts(y.1)
plot(y.1, type='b', ylab='value', xlab='Time', main='Fixed')

y.2 <- rep(0, N)
z <- rpois(N, theta.0[3])
y.2[1] <- 2
for (i in 2:N)
{
  phi <- runif(1, min=0, max=2*exp(theta.0[1]+theta.0[2]*y.2[i-1])/(1+exp(theta.0[1]+theta.0[2]*y.2[i-1])))
  #phi <- rexp(1, (1+exp(theta.0[1]+theta.0[2]*y[i-1]))/exp(theta.0[1]+theta.0[2]*y[i-1]))
  #phi <- rchisq(1, exp(theta.0[1]+theta.0[2]*y[i-1])/(1+exp(theta.0[1]+theta.0[2]*y[i-1])))
  #phi <- exp(theta.0[1]+theta.0[2]*y[i-1])/(1+exp(theta.0[1]+theta.0[2]*y[i-1]))
  y.2[i] <- rpois(1, phi*y.2[i-1]) + z[i]
}
y.2 <- ts(y.2)
plot(y.2, type='b', ylab='value', xlab='Time', main='Uniform')

y.3 <- rep(0, N)
z <- rpois(N, theta.0[3])
y.3[1] <- 2
for (i in 2:N)
{
  #phi <- runif(1, min=0, max=2*exp(theta.0[1]+theta.0[2]*y[i-1])/(1+exp(theta.0[1]+theta.0[2]*y[i-1])))
  phi <- rexp(1, (1+exp(theta.0[1]+theta.0[2]*y.3[i-1]))/exp(theta.0[1]+theta.0[2]*y.3[i-1]))
  #phi <- rchisq(1, exp(theta.0[1]+theta.0[2]*y[i-1])/(1+exp(theta.0[1]+theta.0[2]*y[i-1])))
  #phi <- exp(theta.0[1]+theta.0[2]*y[i-1])/(1+exp(theta.0[1]+theta.0[2]*y[i-1]))
  y.3[i] <- rpois(1, phi*y.3[i-1]) + z[i]
}
y.3 <- ts(y.3)
plot(y.3, type='b', ylab='value', xlab='Time', main='Exponential')

y.4 <- rep(0, N)
z <- rpois(N, theta.0[3])
y.4[1] <- 2
for (i in 2:N)
{
  #phi <- runif(1, min=0, max=2*exp(theta.0[1]+theta.0[2]*y[i-1])/(1+exp(theta.0[1]+theta.0[2]*y[i-1])))
  #phi <- rexp(1, (1+exp(theta.0[1]+theta.0[2]*y[i-1]))/exp(theta.0[1]+theta.0[2]*y[i-1]))
  phi <- rchisq(1, exp(theta.0[1]+theta.0[2]*y.4[i-1])/(1+exp(theta.0[1]+theta.0[2]*y.4[i-1])))
  #phi <- exp(theta.0[1]+theta.0[2]*y[i-1])/(1+exp(theta.0[1]+theta.0[2]*y[i-1]))
  y.4[i] <- rpois(1, phi*y.4[i-1]) + z[i]
}
y.4 <- ts(y.4)
plot(y.4, type='b', ylab='value', xlab='Time', main='Chi-Square')